﻿namespace Usr.Api.Models.Entities;

/// <summary>
/// 管理员
/// </summary>
[SugarTable("sys_user")]
public class User : SqlSugarEntity, ISoftDelete
{
    /// <summary>
    /// 账号
    /// </summary>
    [SugarColumn(ColumnName = "account")]
    public string Account { get; set; } = string.Empty;

    /// <summary>
    /// 头像路径
    /// </summary>
    [SugarColumn(ColumnName = "avatar")]
    public string Avatar { get; set; } = string.Empty;

    /// <summary>
    /// 生日
    /// </summary>
    [SugarColumn(ColumnName = "birthday")]
    public DateTime? Birthday { get; set; }

    /// <summary>
    /// 部门Id
    /// </summary>
    [SugarColumn(ColumnName = "deptid")]
    public long? DeptId { get; set; }

    /// <summary>
    /// email
    /// </summary>
    [SugarColumn(ColumnName = "email")]
    public string Email { get; set; } = string.Empty;

    /// <summary>
    /// 姓名
    /// </summary>
    [SugarColumn(ColumnName = "name")]
    public string Name { get; set; } = string.Empty;

    /// <summary>
    /// 密码
    /// </summary>
    [SugarColumn(ColumnName = "password")]
    public string Password { get; set; } = string.Empty;

    /// <summary>
    /// 手机号
    /// </summary>
    [SugarColumn(ColumnName = "phone")]
    public string Phone { get; set; } = string.Empty;

    /// <summary>
    /// 角色id列表，以逗号分隔
    /// </summary>
    [SugarColumn(ColumnName = "roleids")]
    public string RoleIds { get; set; } = string.Empty;

    /// <summary>
    /// 密码盐
    /// </summary>
    [SugarColumn(ColumnName = "salt")]
    public string Salt { get; set; } = string.Empty;

    /// <summary>
    /// 性别
    /// </summary>
    [SugarColumn(ColumnName = "sex")]
    public int Sex { get; set; }
    /// <summary>
    /// 状态
    /// </summary>
    [SugarColumn(ColumnName = "status")]
    public int Status { get; set; }
    /// <summary>
    /// IsDeleted
    /// </summary>
    [SugarColumn(ColumnDescription = "isdeleted", ColumnName = "isdeleted")]
    public bool IsDeleted { get; set; }
    //[SugarColumn(ColumnName = "name")]
    //public virtual Organization? Dept { get; set; }
}